home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Stolen Data 8
/
Stolen Data 8.adf
/
TEXT
/
mfmarticle
/
mfmarticle
Wrap
Text File
|
1989-08-16
|
6KB
|
206 lines
@^
@t4@f01@cTRACK LOADERS
@t3@f00Typed by OMICRON of Dual Crew
@t5@f00O.K, I am writing this article and
supplying the source for my own
personal custom track loader for three
reasons. Firstly, because there are
so many coders who don't really know
how tracks, disks and MFM work,
because there is no such documentation
in any of the technical reference
manuals, which is really a shame, and
secondly, because most people who code
trackloaders who use the Operating
System functions, such as OPENDEVICE,
and READ etc..., which is not really
cool because reasons which I will
explain later, and thirdly, people who
can program the disk hardware, don't
@^
@t5
really code it the way it should be
done, this is why some loaders may not
work on Amigas with delicate disk
drives, and drives which are not as
fast as others, anyway all this will
be explained.
@t3
SO WHAT ABOUT THE TRACKDISK !
@t5
The trackdisk is the part of the
Kickstart that controls all the disk
hardware from an almost user friendly
point of view. You can do things like
reading tracks, check for protection
tabs, etc. And you can do alot of
advanced things like read individual
disk blocks, and write to disks. The
@#
@^
@t5disadvantages are tenfold, firstly, as
you may know, to use the Amiga
Operating system, the system must be
in a fully working state, which means
that memory is going to be gobbled up
lots and you cannot really rely on the
state of your INTerupts+DMA and your
Status Register. Everything on your
disk must really use the SAFE way, eg
using special EXEC functions for
creating interupt vectors, disabling
interupts, memory management, and disk
calls. If you start writing spurios
data into the INTERUPT AUTOVECTORS, or
change your SR, or start fidling with
copper lists and DMA, you may find
that your greatest demo does not work
on as many Amigas as you would like it
to ! (LSD "DESPAIR" is an example of
a badly coded loader, coz the music
cuts when some new tracks are loaded,
@^
@t5most likely because this uses the OS
in conjuction with INTERUPTS not setup
in a friendly manner). Another big
disadvantage is the trackdisk is
terribly ssllooww and prone to errors.
The way the Operating System deals
with disks is totaly lame the way it
is supposed to (eg. not reading on
SYNC marks and the timing of the disk
step). I don't know whether the error
proneness is a bug in the OS or just
my machine, coz sometimes the tracks
loaded with the trackdisk are
sometimes mashed, so don't quote me on
that !!
@t3HARDWARE LOADER
@t6---------------
@t5
OK you've coded a hardware loader,
what are the advantages ??. There are
@#
@^
@t5quite alot !! Firstly, you have total
control over all the memory and the
system, coz a real trackloader should
not use the OS, so there is no need
for the OS to be resident, so you
don't have to worry about the Amiga
Hardware conflicting with the
operating system. Secondly, you can
customize your drive speeds (you could
have a menu where the user can select
a fast/slow trackload). and you can
customize your own disk format for say
copy protection on your latest cool
game to beat all the crackers. There
are lots of other advantages such as
turning the trackloader into an MFM
file loader, which would work on the
same basis as the OS deals with Data
files, you could even code the loader
to load in executable files, and you
could write your own LIBRARY to use
@^
@t5all these functions within other
programs. You may even change the
loader into a GCR trackloader, and
have 2X as much data on your disks !
THE SKYS THE LIMIT !!
@t3THE SOURCE
@t6----------
@t5
On this magdisk is my own customized
CYLINDER loader (a CYLINDER is 2
tracks). I coded this loader, coz I
used C-MON to write the executeables
to my disk, and C-MON only writes in
CYLINDERS. But this should be no big
deal to change (I have not done it
personaly, coz I haven't coded
anything that really realies on cramp
data). I will give ya a some of the
advantages of using this loader in
prods.
@#
@^
@t5
@t61.@t5 The loader source is very small
(around 540 bytes), and is written
to fit on a bootblock. You can
easily fit a small boot intro with
it on the BOOT as a BOOTBLOCK(S)
is just 1K, or you could write in
some boot text,to waste the 0's.
@t62.@t5 Uses real CIA timing for a 3
millisecond wait for diskstep
(no DBRA's !).
@t63.@t5 Header and Checksum verify (almost
guaranteed to load the specified
track without any errors !
@t64.@t5 Uses SYNC read + reasonable decoding
method.
@t65.@t5 Code is position independant.
@^
@t5
@t66.@t5 Does not assume anything on boot,
eg state of the SR, DMACON, INTENA
or even the ADKCON register !
@t67.@t5 Uses no part of the OS at all !
@t68.@t5 Tries to load the track in 10
times, if failed flashing lights
occur and the computer hangs !
I am not saying that this loader is
the coolest in the world, but it has
taken me around 5 months on/off to get
it to this stage, so I sure hope you
use it and improve on it. It may also
not be without bugs, but I am sure if
you are gonna use a trackloader for
anything, you must be cool enough to
fix these bugs. Heres some
improvements that I thought of making.
@#
@k370,003,03
@^
@t5
@t61.@t5 Blitter decoding
@t62.@t5 4 Drive Capability
@t63.@t5 Data Encrypting
@t64.@t5 Decode one track while reading
another
@t65.@t5 Do something constructive during
STEP waits
@t66.@t5 Find some clever way of using
SYNC + DISKBLK Interupts
@t67.@t5 THE LIST GOES ON !! LOOK AT THE
SPACE ACE LOADER !!!
To know more about Amiga Diskdrives,
read the Abacus Book "AMIGA DISK
DRIVES INSIDE AND OUT", which is lame
in parts, but should help you alot to
know how it all really works !!.
Anyways I got to finish this article
LOVE ON YA !! @t2 Dual Crew 92
@@